import {get,put,post} from './request.js'

 const search=searchFilter=>{
    return post('/music/search',searchFilter)
}

 const create=music=>{
    return post('/music',music)
}

 const update=(id,music)=>{
    return put(`/music/${id}`,music)
}

const publish=id=>{
    return post(`/music/${id}/publish`)
}

 const close=id=>{
    return post(`/music/${id}/close`)
}

export default {
    search,
    create,
    update,
    publish,
    close
}